-- GENERATED SPELL FOR [Sir Malory Wheeler] --


function spell0_15007(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15284,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15007', 661, 1)
end

function spell1_15007(pUnit, Event) --@Frightening Shout,n/a--
pUnit:FullCastSpellOnTarget(19134,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15007', 6349, 1)
end

function spell2_15007(pUnit, Event) --@Mortal Strike,n/a--
pUnit:FullCastSpellOnTarget(16856,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_15007', 5306, 1)
end

function spell3_15007(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(15589,pUnit)
pUnit:RegisterEvent('Sorts_15007', 550, 1)
end

function spell4_15007(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(13736,pUnit)
pUnit:RegisterEvent('Sorts_15007', 2000, 1)
end

function Sorts_15007(pUnit, Event)
local choix_sorts_15007 = math.random(0, 4)
if choix_sorts_15007 == 0 then
pUnit:RegisterEvent('spell0_15007', 1, 1)
end
if choix_sorts_15007 == 1 then
pUnit:RegisterEvent('spell1_15007', 1, 1)
end
if choix_sorts_15007 == 2 then
pUnit:RegisterEvent('spell2_15007', 1, 1)
end
if choix_sorts_15007 == 3 then
pUnit:RegisterEvent('spell3_15007', 1, 1)
end
if choix_sorts_15007 == 4 then
pUnit:RegisterEvent('spell4_15007', 1, 1)
end
end

function mob15007_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_15007', math.random(1500, 3000), 1)
end

function mob15007_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15007_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob15007_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(15007, 1, 'mob15007_Action')
RegisterUnitEvent(15007, 2, 'mob15007_Leave')
RegisterUnitEvent(15007, 3, 'mob15007_Kill')
RegisterUnitEvent(15007, 4, 'mob15007_Die')
